<div class="bg-light lter b-b wrapper-md ng-scope" ng-controller="modulesAdvertisementAddCtrl">
    <h4 class="m-n font-thin">模块广告管理</h4>
    <!--<button ui-sref="app.modulesAdvertisement({modulesId:modulesId})" class="btn-back btn btn-dark btn-sm btn-rounded">-->
        <!--返回-->
    <!--</button>-->
</div>
<div class="wrapper-md" ng-controller="modulesAdvertisementAddCtrl">
    <div class="panel panel-default">
        <div class="panel-heading m-n">
            添加广告信息
        </div>
        <div class="panel-body">
            <form name="advertiseForm" class="form-horizontal form-validation" ng-submit="addModulesAdvertise()">
                <div class="form-group">
                    <label class="col-sm-2 control-label">广告类型</label>
                    <div class="col-sm-5">
                        <select name="type" class="form-control" ng-model="modulesAdvertisementAddService.modulesAdvertiseAddVO.advertiseTypeId" required>
                            <option value="">请选择广告类型</option>
                            <option value="{{item.id}}" ng-repeat="item in advertiseTypes">{{item.name}}</option>
                        </select>
                    </div>
                    <div class="col-sm-5 form-text" ng-if="advertiseForm.type.$touched">
                        <span class="text text-danger" ng-if="advertiseForm.type.$error.required">广告类型是必选的</span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">广告链接</label>
                    <div class="col-sm-5">
                        <input type="text" name="url" class="form-control" placeholder="请输入广告链接(小程序链接)" ng-model="modulesAdvertisementAddService.modulesAdvertiseAddVO.advertiseUrl" required>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">排序</label>
                    <div class="col-sm-1">
                        <input ui-jq="TouchSpin" ng-model="modulesAdvertisementAddService.modulesAdvertiseAddVO.sort" type="text" value="0" class="form-control text-center" data-min="0" data-max="100" data-step="1" data-decimals="0" style="display: block;">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">广告图片</label>
                    <div class="col-md-10 no-padder">
                        <div class="m-">
                            <uploadpic queue-limit="1" path="{{path}}"  images="bannerImages" app="app" queue="imgQueue" del-func="delBannerImages" required></uploadpic>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-4 col-sm-offset-2">
                        <button type="submit" class="btn btn-success">保存</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>